package cn.codingjc.framework.common.core.status.core;

import java.util.Objects;

/**
 * @ClassName StatusEventPair
 * @Description 状态事件对
 * @Author jccoding
 * @Date 2024/3/5 17:16
 * @Version 1.0
 **/
public class StatusEventPair <S extends BaseStatus, E extends BaseEvent>{

    private S status;
    private E event;

    public StatusEventPair(S status, E event) {
        this.status = status;
        this.event = event;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof StatusEventPair) {
            StatusEventPair<S, E> other = (StatusEventPair) obj;
            return status.equals(other.status) && event.equals(other.event);
        }
        return false;
    }

    @Override
    public int hashCode() {
        return Objects.hash(status, event);
    }
}
